{% extends "gestionBase.html" %}

{% block titre %}Modification/Creation Armees{% endblock %}

{% block contenu %}
<form action="/gestion/soumetArmee" method="post">
    <input type="hidden" name="cleArmee" value="{{armee.key}}"/>
    <input type="hidden" name="cleJoueur" value="{{armee.keyJoueur.key}}"/>
    <table width="70%">
        <tr class="titre">
            <td>Séquence de combat</td>
            <td>destination</td>
            <td>Region de depart</td>
        </tr>
        <tr class="donnee" align="center">
          <td>
            <input type="text" name="sequenceCombat" value="{{armee.sequenceCombat}}"/>
          </td>
          <td>
            <select name="cleRegion">
            {% for region in listeRegions %}
                <option value="{{region.key}}" {% ifequal region.key armee.keyRegion.key %}selected{% endifequal %}>{{region.nom}}</option>
            {% endfor %}
            </select>
          </td>
          <td>
            {{armee.precedenteRegion}}
            <input type="hidden" name="regionDepart" value="{{armee.precedenteRegion}}"/>
          </td>
        </tr>
    </table>
    <div><input type="submit" value="Sauvegarder les modifications"></div>
</form>
{% endblock %}